import processing.opengl.*;
import processing.core.PApplet;
import processing.core.PFont;
PFont font; 
int stgW = 320;
int stgH = 240; 
/*------------------------------------------------------------------------------------------------------------------*/
Cursor[] myCursors; 
Tracker myTracker;
Gradient gradientBG;
public void setup() { 
  setupConfetti();  
  setupGestures();  
/*------------------------------------------------------------------------------------------------------------------*/
 //setFullScreen( true );
  setResolution(stgW,stgH);
  createFullScreenKeyBindings(); 
/*------------------------------------------------------------------------------------------------------------------*/
  //noCursor();
  rectMode(CENTER);
  ellipseMode(CENTER);
  frameRate(120);  
  size(stgW, stgH, OPENGL); 
  font = loadFont("CourierNew36.vlw");
  textFont(font, 12); 
/*------------------------------------------------------------------------------------------------------------------*/
  t0=millis();  
  createObject(275,300,725,850,1400); 
  C.setTo(width/2,height/2);
/*------------------------------------------------------------------------------------------------------------------*/
  gradientBG = new Gradient(100,100,0x000000,0xFFFFFF);
  gradientBG.vertical(); 
/*------------------------------------------------------------------------------------------------------------------*/
  myCursors = new Cursor[10];
  myTracker = new Tracker(myCursors); 
/*------------------------------------------------------------------------------------------------------------------*/
  leftOv = loadImage("left.png");
  rightOv = loadImage("right.png");
  topOv = loadImage("top.png");
  bottomOv = loadImage("bottom.png");
  textureMode(NORMALIZED); 
}
public void draw() { 
  createGradient(); 
  //background(0);
  myTracker.checkBlobs();
  if (debugCursor) myTracker.drawDebug(g);
  for (int i = 0; i < myCursors.length; i++) {
  if (myCursors[i] != null) {    
  if (debugCursor)myCursors[i].debugCursor(g);
  if (touchCursor)myCursors[i].touchCursor(); 
  if (gestureCursor)myCursors[i].gestureCursor();
  if (paintCursor)myCursors[i].paintCursor();
  //if (audioCursor)myCursors[i].audioCursor();
  if (defaultCursor)myCursors[i].defaultCursor(g); 
  }       
 }     
 
}  
